package edu.pk.mc.breakthebrick;

//import java.util.HashMap;
//import java.util.Map;
import java.util.HashMap;
import java.util.Map;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;

public class MainActivity extends Activity {

	private static Map<Integer, Class<? extends Activity>> map = new HashMap<Integer, Class<? extends Activity>>();
	
	static{
		map.put(R.id.button1, ArrangementActivity.class);
		map.put(R.id.button4,AboutActivity.class);
		//map.put(R.id.button3, HighScoreActivity.class);
		
	}
	public void click(View v){
		startActivity(
				new Intent(this, map.get(v.getId()))
		);
	}
	
	public void scores(View v)
	{
		Intent i=new Intent(this,HighScoreActivity.class);
		startActivityForResult(i, 0);
	}
	@Override
	protected void onActivityResult(int requestCode, int resultCode, Intent data) {
		// TODO Auto-generated method stub
		super.onActivityResult(requestCode, resultCode, data);
	}
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}
	
	

}
